<?php
$data = array(
'log_game_scores.game_id'=>'Mã game',
'log_game_scores.use_id'=>'Mã thành viên',
'log_gscores_browser'=>'Browser',
'log_gscores_platform'=>'Platform',
'log_gscores_ip'=>'IP',
);
$default = array();
echo $this->atheme->form_search($data,array(),$default);
?>
<?php
$header = array(
	'Image'=>'',
	'Tên game'=>'', 
	'Thành viên'=>'',
	'Lỗi'=>'',
	'IP'=>'',
	'Link'=>'',
	//'Referrer'=>'',
	'Browser'=>'',
	'Platform'=>'',
	//'Agent'=>'',
	'GKey'=>'',
	'Thời gian'=>'',

	);
$config = array(
    'header_icon' => @$this->resource->RES_ICON,
    'header_title' => 'Quản lý '.@$this->resource->RES_NAME,
    'add_title' => 'Thêm '.@$this->resource->RES_NAME,
    'ID' => '0',
    'showEdit' => false,
    'showDelete' => false,
    'showAdd' => false,
);
if ($this->permission->check("delete", $this->resource->RES_CODE))
    $config['showDelete'] = true;

//if ($this->permission->check("update", $this->resource->RES_CODE))
   // $config['showEdit'] = true;
	
//if ($this->permission->check("insert", $this->resource->RES_CODE))
   // $config['showAdd'] = true;

$data = array();
$stt = 0;
$arr_error_type = array();
$arr_error_type['score_null'] = 'Lỗi post điểm';
$arr_error_type['key_null'] = 'Lỗi post key';
$arr_error_type['score_less_0'] = 'Điểm < 0';
$arr_error_type['game_not_exist'] = 'Không tìm thấy game';
foreach ($datas as $result) {
$error = @$arr_error_type[$result->log_gscores_code];
    $data[] = array($result->{$this->{$this->model}->primaryKey},'<img src="'.image_src($result->game_thumb).'" width="50" height="50">', '<a href="'.game_url($result->game_id, $result->game_code).'" target="_blank">'.$result->game_title.'</a>',$result->use_account,$error,$result->log_gscores_ip,'<a href="'.$result->log_gscores_referrer.'">Link</a>','<a href="#" class="tip-top" data-original-title="'.$result->log_gscores_agent.'">'.$result->log_gscores_browser.'</a>',$result->log_gscores_platform,$result->log_gscores_game_key, date("d/m/Y H:i:s",$result->log_gscores_time));
}
echo $this->atheme->table_simple($header, $data, $config);
?>

